<?php 
class visitahistController extends CController{
    
    protected $blocked_actions = array('apagar', 'editar');
    public $model_name = 'venda/visitahist';
    public function AfterLoad() {
        parent::AfterLoad();
        if(CURRENT_ACTION != 'show' && isset($this->item['__visita'])){
            Redirect('venda/visita/show/'.$this->item['__visita']);
        }
    }

}
?>